###
### Set the location of the FIM DPE assembly and its references
###
$dropFolder = "\\tsclient\D\FimDataProcessingExtension\putout"

###
### Find the SSRS path
###
if (Test-Path "HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server\MSRS10.MSSQLSERVER\Setup")
{
    $SSRSInstallFolder = (Get-ItemProperty -path "HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server\MSRS10.MSSQLSERVER\Setup").SQLpath
}
elseif (Test-Path "HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server\MSRS10_50.MSSQLSERVER\Setup")
{
    $SSRSInstallFolder = (Get-ItemProperty -path "HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server\MSRS10_50.MSSQLSERVER\Setup").SQLpath
}

$RSBinFolder = "$SSRSInstallFolder" + "ReportServer\bin\"

Copy-Item -Force (Join-Path $dropFolder FimDataProcessingExtension.dll) $RSBinFolder
Copy-Item -Force (Join-Path $dropFolder Microsoft.ResourceManagement.Client.dll) $RSBinFolder
Copy-Item -Force (Join-Path $dropFolder Microsoft.ResourceManagement.ObjectModel.dll) $RSBinFolder

